package com.lineage.config;

import java.io.File;
import java.io.FileInputStream;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.util.Properties;
import org.apache.commons.logging.Log;

public final class Configtf {
  public static int retfitem;
  
  public static int retfitemcount;
  
  public static String msg0;
  
  public static int tftype1;
  
  public static int tftype2;
  
  public static int tftype3;
  
  public static int tftype4;
  
  public static int tftype5;
  
  public static int tftype6;
  
  public static int tftype7;
  
  public static int tftype8;
  
  public static int tftype9;
  
  public static int tftype10;
  
  public static int tfup;
  
  public static int tfup1;
  
  public static int tfup2;
  
  public static int tfup3;
  
  public static int tfup4;
  
  public static int tfup5;
  
  public static int tfup6;
  
  public static int tfup7;
  
  public static int tfup8;
  
  public static int tfup9;
  
  public static int tfup10;
  
  private static Log _log;
  
  private static final String OTHER_SETTINGS_FILE = "./config/其他控制端/天赋控制表.properties";
  
  public static void load() throws ConfigErrorException {
    Properties set = new Properties();
    try {
      InputStream is = new FileInputStream(new File("./config/其他控制端/天赋控制表.properties"));
      InputStreamReader isr = new InputStreamReader(is, "utf-8");
      set.load(isr);
      is.close();
      retfitem = Integer.parseInt(set.getProperty("retfitem", "1"));
      retfitemcount = Integer.parseInt(set.getProperty("retfitemcount", "1"));
      tftype1 = Integer.parseInt(set.getProperty("tftype1", "1"));
      tftype2 = Integer.parseInt(set.getProperty("tftype2", "1"));
      tftype3 = Integer.parseInt(set.getProperty("tftype3", "1"));
      tftype4 = Integer.parseInt(set.getProperty("tftype4", "1"));
      tftype5 = Integer.parseInt(set.getProperty("tftype5", "1"));
      tftype6 = Integer.parseInt(set.getProperty("tftype6", "1"));
      tftype7 = Integer.parseInt(set.getProperty("tftype7", "1"));
      tftype8 = Integer.parseInt(set.getProperty("tftype8", "1"));
      tftype9 = Integer.parseInt(set.getProperty("tftype9", "1"));
      tftype10 = Integer.parseInt(set.getProperty("tftype10", "1"));
      tfup = Integer.parseInt(set.getProperty("tfup", "1"));
      msg0 = set.getProperty("msg0", "");
      tfup1 = Integer.parseInt(set.getProperty("tfup1", "1"));
      tfup2 = Integer.parseInt(set.getProperty("tfup2", "1"));
      tfup3 = Integer.parseInt(set.getProperty("tfup3", "1"));
      tfup4 = Integer.parseInt(set.getProperty("tfup4", "1"));
      tfup5 = Integer.parseInt(set.getProperty("tfup5", "1"));
      tfup6 = Integer.parseInt(set.getProperty("tfup6", "1"));
      tfup7 = Integer.parseInt(set.getProperty("tfup7", "1"));
      tfup8 = Integer.parseInt(set.getProperty("tfup8", "1"));
      tfup9 = Integer.parseInt(set.getProperty("tfup9", "1"));
      tfup10 = Integer.parseInt(set.getProperty("tfup10", "1"));
    } catch (Exception e) {
      throw new ConfigErrorException("设置档案遗失: ./config/其他控制端/天赋控制表.properties");
    } finally {
      set.clear();
    } 
  }
}
